package com.trkj.controller.lzs;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


import com.trkj.pojo.Recruitprocess;
import com.trkj.service.lzs.RecruitprocessService;
import com.trkj.vo.Result2;

@Controller
public class RecruitprocessController {
	  @Autowired
	   private RecruitprocessService  RecruitprocessService;
	 
		@RequestMapping("lzs_findRecruitprocess")
		@ResponseBody
		public List<Recruitprocess> getJSON1(){
			List<Recruitprocess> list = RecruitprocessService.Recruitprocess1();
			list.forEach(e->{
				System.err.println("aaaaaaaaaaaaaaa"+e);
			});
			return list;
		}
	  //添加
			@RequestMapping("lzs_tianjia")
			@ResponseBody
			public void tianjia(String reproName,String reproPerson ){
				RecruitprocessService.wan(reproName, reproPerson );
				
			}
			/*修改
			*/
			@RequestMapping("lzs_Recruitprocessxiugai")
			@ResponseBody  
			public  Result2  Recruitprocessxiugaixiugai(long reproId,String reproName ,String reproPerson) {
				try {
					RecruitprocessService.lzs_Edit(reproId, reproName, reproPerson);
					return Result2.SUCCESS;
				} catch (Exception e) {
						e.printStackTrace();
					return Result2.failure(e.getMessage());
				}
				
			}
			
			@RequestMapping("lzs_Recruitprocessxiugai1")
			@ResponseBody  
			 public Recruitprocess chunq(Long reproId) {
		    	 return RecruitprocessService.chun(reproId);
		     }
}
